#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int digits(int x)
{
    if (x == 0)
        return 0;
    else
        return 1 + digits(x / 10);
}

int countSymmetricIntegers(int low, int high) {
    int i = low;
    int count = 0;
    for (i = low; i < high; i++)
    {
        int len = digits(i);
        if (len == 2)
        {
            int sum1 = i % 10;
            int sum2 = i / 10 % 10;
            if (sum1 == sum2)
                count++;
        }
        if (len == 4)
        {
            int sum1 = i % 10 + i / 10 % 10;
            int sum2 = i / 10 / 10 % 10 + i / 10 / 10 / 10 % 10;
            if (sum1 == sum2)
                count++;
        }

    }
    return count;


}

int main()
{
    printf("%d", countSymmetricIntegers(1200, 1230));
    return 0;
}